num = input()
print(len(num))
for i in range(len(num)):
    print(num[i], end="")
print()
for i in range(len(num)):
    print(num[len(num) - i - 1], end="")
